# Maintainer: David Runge <dvzrv@archlinux.org>

_name=orderedmultidict
pkgname=python-orderedmultidict
pkgver=1.0.1
pkgrel=10
pkgdesc="Ordered multivalue dictionary that retains method parity with dict."
arch=(any)
url="https://github.com/gruns/orderedmultidict"
license=(Unlicense)
depends=(python python-six)
makedepends=(python-build python-installer python-setuptools python-wheel)
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
sha512sums=('5a826bb46dfe9d7e6e2159bf545612a35dd0f1bb5817c1fd78e0f3f4019f9144b36be94af08f87e881a310f593091df09702d001624c377f559a30f64b219c24')
b2sums=('1e8151f83992d6b805836f2e51ee726c905f303d5bc4bb28fbc2b0d413e63858177dace5a30bf72587c9b08dd866bd6192e318dcad3eef3fb4b60de4a2c5a9e2')

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd $_name-$pkgver
  python -m unittest discover -vs tests
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 {API,README}.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
